package meta

var sqlInsertMetaTable = `
INSERT INTO meta_tables (tenant_id,title, name, description) VALUES (@tenant_id,@title, @name, @description);
`

var sqlGetMetaTableByID = `
SELECT table_id, tenant_id,title, name, description, created_at, updated_at 
FROM meta_tables 
WHERE table_id = @table_id AND tenant_id = @tenant_id;
`

var existMetaTable = `
SELECT 1 
FROM meta_tables 
WHERE tenant_id = @tenant_id and name = @name;
`

var sqlUpdateMetaTable = `
UPDATE meta_tables 
SET title = @title, description = @description, updated_at = CURRENT_TIMESTAMP 
WHERE table_id = @table_id AND tenant_id = @tenant_id;
`

var sqlDeleteMetaTable = `
DELETE FROM meta_tables 
WHERE table_id = @table_id AND tenant_id = @tenant_id;
`
